using UnityEngine;
using System.Collections;

public class ReferencePoint : MonoBehaviour 
{
	public Transform pointA;
	public Transform pointB;
	
	public void Update ()
	{
		transform.position = Midpoint ();
	}
	
	private Vector3 Midpoint ()
	{		
		return new Vector3 ((pointA.position.x + pointB.position.x) / 2,
		                    (pointA.position.y + pointB.position.y) / 2,
		                    (pointA.position.z + pointB.position.z) / 2);
	}
}